package com.hth.data;

public class DataObject {
	
	public DataObject(String id, double xPosition, double yPosition) {
		super();
		this.id = id;
		this.xPosition = xPosition;
		this.yPosition = yPosition;
	}
	
	public DataObject(String data) {
		String[] dataArray = data.split("-");
		if (dataArray.length == 4) {
			this.id = dataArray[1];
			this.xPosition = Double.parseDouble(dataArray[2]);
			this.yPosition = Double.parseDouble(dataArray[3]);
		}
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public double getxPosition() {
		return xPosition;
	}
	public void setxPosition(double xPosition) {
		this.xPosition = xPosition;
	}
	public double getyPosition() {
		return yPosition;
	}
	public void setyPosition(double yPosition) {
		this.yPosition = yPosition;
	}

	private String id;
	private double xPosition;
	private double yPosition;
}
